<?php
/**
* Currency Add/Edit
* @author: trungdt
* @since: Oct 13, 2011
* @version: 1.0
* 
* Change logs
* 
*/

if (!defined("EXPONENT")) exit("");
	$cur = null;
	if (isset($_GET['id'])) {
		$cur = $db->selectObject("productsmodule_currency","id=".intval($_GET['id']));
	}
	
	if (exponent_permissions_check(array("administrate"), $loc)){
		$form = productsmodule_categories::currency_form($cur);
		$form->location($loc);
		$form->meta("action","currency_save");
		$form->meta("module","productsmodule");
				
		$template = new template("productsmodule","_currency_edit",$loc);
		$template->assign("is_edit",(isset($cur->id) ? 1 : 0));
		$template->assign("form_html",$form->toHTML());
		$template->output();
	} else {
		echo SITE_403_HTML;
	}

?>